package com.hl.qzzpbackend.model.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 修改密码请求类
 * @author helong
 */
@Data
@ApiModel(value = "修改密码请求类")
public class UserUpdatePasswordRequest implements Serializable {

    private static final long serialVersionUID = -2997095022800037518L;

    /**
     * id
     */
    @NotNull(message = "id不能为空")
    @Min(value = 1, message = "id不能小于1")
    @ApiModelProperty(value = "id")
    private Long id;

    /**
     * 旧密码
     */
    @NotBlank(message = "旧密码不能为空")
    @Size(min = 8, max = 16, message = "旧密码长度在8-16位之间")
    @ApiModelProperty(value = "旧密码")
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Size(min = 8, max = 16, message = "新密码长度在8-16位之间")
    @ApiModelProperty(value = "新密码")
    private String newPassword;

    /**
     * 确认密码
     */
    @NotBlank(message = "确认密码不能为空")
    @Size(min = 8, max = 16, message = "确认密码长度在8-16位之间")
    @ApiModelProperty(value = "确认密码")
    private String checkPassword;


}
